import Vue from 'vue'
import Vant from 'vant'
import 'vant/lib/index.css'
// import Vuex from 'vuex'
import App from './App.vue'
import router from './router'

import store from './store'
import './assets/styles/main.css'
import { serverUrl } from './utils/config'

Vue.config.productionTip = false
// Vue.use(Vuex)
Vue.use(Vant)

// 全局过滤器
Vue.filter('resetImg', str => {
  if (str && str.startsWith('http')) {
    return str
  } else {
    return serverUrl + str
  }
})
/* const store = new Vuex.Store({
  state: {
    count: 1
  },
  mutations: {
    plus(state, step = 1) {
      state.count += step
    },
    reduce(state) {
      state.count--
    }
  }
}) */

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
